package org.mspring.platform.dao;

import java.io.Serializable;
import java.util.List;

import org.mspring.platform.dao.support.Page;
import org.mspring.platform.dao.support.QueryAppender;

public abstract interface BaseDao<T> {
    public abstract <PK extends Serializable> T get(PK paramPK);

    public abstract void save(T paramT);

    public abstract void update(T paramT);

    public abstract void delete(T paramT);

    public abstract <PK extends Serializable> void delete(PK paramPK);

    public abstract T findUnique(QueryAppender paramQueryAppender);

    public abstract T findUnique(String queryString, Object value);

    public abstract T findUnique(String queryString, Object[] values);

    public abstract <X> X findUnique(String queryString, Class<X> retType, Object[] values);

    public abstract Page<T> findPage(Page<T> paramPage, QueryAppender paramQueryAppender);

    public abstract Page<T> findPage(Page<T> page, String queryString, Object[] values);

    public abstract List<T> find(QueryAppender paramQueryAppender);

    public abstract List<T> find(String queryString);
    
    public abstract List<T> find(String queryString, Object values);

    public abstract List<T> find(String queryString, Object[] values);

    public abstract <X> List<X> find(String queryString, Class<X> retType, Object[] values);

    public abstract long count(QueryAppender paramQueryAppender);

    public abstract Long count(String queryString, Object[] values);
    
    public abstract List<T> findAll();
}